export module DefVar;

import DND;

export namespace DefVar
{
	//-----------------------固定常量-------------------------
	constexpr real KM_PER_L = 111;		//!<	每经度公里
	constexpr Size SIZE_L = {360, 180};	//!<	经纬度范围


	//-----------------------可调常量---------------------------
	constexpr real NODE_PIXEL = 32.0;			//!< 节点像素大小
	constexpr natural NUM_NODE_PER_L = 10;			//!< 每经纬度格子数

	//!< {0, 0}所在LL 注意y轴向下
	constexpr Point LL_NODE_ZERO = { 100 * (zahlen)NUM_NODE_PER_L, 30 * (zahlen)NUM_NODE_PER_L };
	//-----------------------计算常量---------------------------
	constexpr Vector2 SIZE_NODE_PIXEL = { NODE_PIXEL, NODE_PIXEL };

	constexpr real SIZE_NODE_REAL = KM_PER_L / NUM_NODE_PER_L;	//!< 节点实际大小km

	constexpr real L_PER_NODE = 1.0 / NUM_NODE_PER_L;		//!< 每格子多少经纬度

	//! 地图纹理大小
	constexpr Size SIZE_MAP_TEX = { SIZE_L[0] * NUM_NODE_PER_L, SIZE_L[1] * NUM_NODE_PER_L };

	//! 地图纹理偏移
	constexpr Point OFFSET_MAP_TEX = { LL_NODE_ZERO[0], (zahlen)SIZE_MAP_TEX[1] / 2 - LL_NODE_ZERO[1] };
	//---------------------------其余-------------------------------------------------
	//! 名字缓冲区大小（定居点名字）
	//constexpr size_t SIZE_MAX_NAME = 32;

	//! UI
	constexpr real UI_DX_0 = 105.0;				
	constexpr real UI_DX_BUTTON_TEXT = 40.0;
	constexpr real UI_DY_0 = 30.0;
	constexpr real UI_DX_MENU = 120.0;

	constexpr real UI_SX_RIGHT = -300.0;
	constexpr Vector2 UI_RIGHT_0 = {1.0, 0.25};

	constexpr real UI_SX_LEFT = 30.0;
	constexpr Vector2 UI_LEFT_0 = { 0.0, 0.25 };
	constexpr zahlen UI_W = 290.0;
	constexpr zahlen UI_H = 40.0;
	constexpr Point UI_EXTRA_MENU = { 32, 32 };			//!< 菜单

	constexpr Point UI_OFFSET_BG = { -16, -16 };

	constexpr Point UI_EXTRA_AGE = { 240, 0 };
	constexpr Point UI_OFFSET_AGE = { -120, 0 };

	//! Color
	constexpr Color COLOR_TEXT_EDITBOX_NORMAL = createColor(0x292929ff);
	constexpr Color COLOR_TEXT_EDITBOX_SELECT = createColor(0xc60000ff);

	//! 缩放等级
	//constexpr size_t SCALE_LEVEL_0_CAPITAL = 0; //首都
	//constexpr size_t SCALE_LEVEL_1_PROVINCE = 1;//省会
	//constexpr size_t SCALE_LEVEL_2_CITY = 2;//市（区域）
	//constexpr size_t SCALE_LEVEL_3_COUNTY = 3;//县
	//constexpr size_t SCALE_LEVEL_4_VILLAGE = 4;//乡

}